package com.lanzx.gulimall.search.vo;

import com.lanzx.gulimall.common.to.es.SkuEsModel;
import lombok.Data;

import java.io.Serializable;
import java.util.List;

/**
 * @author: lanzx
 * @description: 查询的返回结果
 * @date: 2021/1/14 10:14
 */
@Data
public class SearchResult implements Serializable {

    private static final long serialVersionUID = -8680782940892218525L;

    /**
     * 查询到的所有商品信息
     */
    private List<SkuEsModel> products;

    /**  分页信息 */
    /**
     * 当前页码
     */
    private Integer pageNum;

    /**
     * 总记录数
     */
    private Long total;

    /**
     * 总页码
     */
    private Integer totalPages;

    /**
     * 当前查询结果所有涉及到的品牌
     */
    private List<BrandVo> brands;

    /**
     * 当前查询结果所有涉及到的分类
     */
    private List<CatalogVo> catalogs;

    /**
     * 当前查询结果所有涉及到的属性
     */
    private List<AttrVo> attrs;

    @Data
    private static class BrandVo{
        private Long brandId;

        private String brandName;

        private String brandImg;
    }

    @Data
    private static class CatalogVo{
        private Long catalogId;

        private String catalogName;
    }

    @Data
    private static class AttrVo{
        private Long attrId;

        private String attrName;

        private List<String> attrValue;
    }

}
